package com.example.userui.controller;

import com.example.goodscommons.pojo.User;
import com.example.userui.feign.UserUIFeign;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/user")
public class UserUIController {

    @Resource
    private UserUIFeign userUIFeign;

    @RequestMapping("/list")
    public List<User> list(){
        List<User> users=userUIFeign.getUserList();
        return users;
    }
}
